﻿using System.IO.IsolatedStorage;
using ZO.SmartCore.Configuration;
using ZO.SmartCore.Threading;
using ZO.SmartCore.Logger;
using System.Configuration;

namespace ZO.SmartCore.My4CSharp
{
    /// <summary>
    /// makes programming faster and easier by giving you intuitive access to commonly used 
    /// methods, properties, and events.
    /// </summary>
    public static class That
    {

        #region Constructors

        #endregion

        #region Destructor

        #endregion

        #region Fields
        private static readonly ThreadSafeObjectProvider<ConfigurationSettings<ConfigBasedConfigurationProvider, ConfigBasedConfigurationFormat>> _Settings = new ThreadSafeObjectProvider<ConfigurationSettings<ConfigBasedConfigurationProvider, ConfigBasedConfigurationFormat>>();
        private static readonly ThreadSafeObjectProvider<Computer> _Computer = new ThreadSafeObjectProvider<Computer>();
        private static readonly ThreadSafeObjectProvider<User> _User = new ThreadSafeObjectProvider<User>();
        private static readonly ThreadSafeObjectProvider<WinFormApplication> _Application = new ThreadSafeObjectProvider<WinFormApplication>();

        private static readonly ThreadSafeObjectProvider<Log<ConfigBasedLogProvider, ConfigBasedLogFormat>> _Log = new ThreadSafeObjectProvider<Log<ConfigBasedLogProvider, ConfigBasedLogFormat>>();

        #endregion

        #region Events

        #endregion

        #region Operators

        #endregion

        #region Properties
        /// <summary>
        /// provide access to your application's settings
        /// </summary>
        public static ConfigurationSettings<ConfigBasedConfigurationProvider, ConfigBasedConfigurationFormat> Settings
        {
            get
            {
                return _Settings.Instance;
            }
        }

        /// <summary>
        /// Provides properties for manipulating computer components such as audio, the clock, the keyboard, the file system, and so on.
        /// </summary>
        public static Computer Computer
        {
            get { return _Computer.Instance; }
        }

        /// <summary>
        /// Provides access to the information about the current user.
        /// </summary>
        public static User User
        {
            get { return _User.Instance; }
        }

        /// <summary>
        /// Provides properties, methods, and events related to the current application.
        /// </summary>
        public static WinFormApplication Application
        {
            get { return _Application.Instance; }
        }

        /// <summary>
        /// Returns the Log Object, which provides a property and methods for writing event and
        /// exception information to the application's event log.
        /// </summary>
        public static Log<ConfigBasedLogProvider, ConfigBasedLogFormat> Log
        {
            get
            {
                return _Log.Instance;
            }
        }

        #endregion

        #region Methods

        #endregion
    }
}
